using MediatR;
using RBAC.ErrorCode;
using System.ComponentModel.DataAnnotations;

namespace RBAC.Write.Api.Application.Command.ERP.SalesManagement
{
    /// <summary>
    /// 审核/反审核/退回 销售订单
    /// action: 1=审核, 0=反审核, 2=退回
    /// </summary>
    public class ApproveOrReturnSalesOrderCommand : IRequest<APIResult<bool>>
    {
        [Required]
        public long Id { get; set; }

        /// <summary>
        /// 1=审核, 0=反审核, 2=退回
        /// </summary>
        [Range(0, 2)]
        public int Action { get; set; }

        /// <summary>
        /// 审核人名称（可选，审核时使用）
        /// </summary>
        public string? AuditorName { get; set; }
    }
}
